home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group93b.txt
/
000126_icon-group-sender _Mon May 24 16:17:47 1993.msg
< prev
next >
Wrap
Internet Message Format
|
1993-06-16
|
2KB
Received: from owl.CS.Arizona.EDU by cheltenham.CS.Arizona.EDU; Tue, 1 Jun 1993 15:03:45 MST
Received: by owl.cs.arizona.edu; Tue, 1 Jun 1993 15:03:44 MST
Date: 24 May 93 16:17:47 GMT
From: mcsun!uknet!warwick!zaphod.crihan.fr!univ-lyon1.fr!scsing.switch.ch!news.unige.ch!NewsWatcher!user@uunet.uu.net (Boris Borcic)
Organization: University of Geneva
Subject: Yet another variation on queens (was Icon vs Prolog)
Message-Id: <borbor-240593173741@129.194.82.105>
References: <9305171538.AA58087@enlil.premenos.sf.ca.us>
Sender: icon-group-request@cs.arizona.edu
To: icon-group@cs.arizona.edu
Status: R
Errors-To: icon-group-errors@cs.arizona.edu
First of all, I would like to thank all who replied to my
question on Icon and Prolog.
In article <9305171538.AA58087@enlil.premenos.sf.ca.us>, Ken Walker
<kwalker@shara.premenos.sf.ca.us> wrote:
[...]
> Icon, on the other hand,
> has more features and as an imperative languages gives you more
> control and more flexibility. It might be interesting to look at
> specific problems.
>
> Ken Walker, kwalker@premenos.sf.ca.us
One example I have in mind is YAVQ : yet another variation on the
queens problem. The problem :
1) Write a search algorithm that generates the first solution only
(according to the lexicographic order on permutations), for
each family of rotated and/or reflected solutions, by *pruning*
the search tree ASAP rather than testing the generated solutions.
2) Write a search algorithm that chooses the next choicepoint
among the remaining unoccupied rows *and* columns according to
some criterion (say, that the breadth of the choicepoint is
minimal).
3) Write a 3D version of 1+2, e.g. N^2 queens in N^3 cubic "board"
(are there any 3d solutions to N^2 queens ? should one use plane
diagonals, 3d diagonals, or both ?)
Note that the number of symmetries usable to constrain the
search raises from 8 in 2d to 48 in 3d.
I have no code to propose, and indeed did not completely think this
through. But I could find no easy way to maintain the data structure
for implementing [2] (in the context of [1]) in Prolog, except
by not using the in-built backtracking at all. If memory serves,
the problem is both the absence of globals and the "total data
amnesia" in Prolog, as noted by one of the previous posters.
Regards,
Boris Borcic